SONIC RIDERS: ZERO GRAVITY - PC PORT
How to set it up and play
====================================

This is a native Windows port of the Wii game, made by recompiling the game's program
code for PC. It does NOT include the game: no graphics, music, sound or text from it.
You need your own copy of the Wii version, and the port reads everything from it.


WHAT YOU NEED
-------------
1. Your own Wii disc of Sonic Riders: Zero Gravity - North American version
   (game ID RS9E8P). Other regions and the PlayStation 2 version will NOT work.
2. Dolphin, the GameCube/Wii emulator (free, from dolphin-emu.org). The port uses
   Dolphin's own tools to unpack your disc and your Wii saves. Get a recent version,
   since older ones don't come with DolphinTool.exe.
3. About 4 GB of free disk space (about 8.5 GB more if you add Regravitified).


STEP 1 - MAKE A COPY OF YOUR DISC
---------------------------------
Copy ("dump") your own disc to a file, for example with CleanRip on a Wii that runs
homebrew. You'll end up with a disc image such as an .iso. Dolphin can also convert
it to a smaller .rvz file (right-click the game > Convert File...), and the port
accepts both.

The port can't read the disc in a PC drive directly. Wii discs need a Wii (or a few
specific old PC drives) to be read.


STEP 2 - INSTALL THE PORT
-------------------------
Unzip the download wherever you like, e.g. C:\Games\SRZG. You should have:

    SRZG\
      port\
        bin\srgz.exe      <- start the game with this
        README - How to play.txt
        CREDITS.txt

The game's icon: as soon as SET UP has finished (and at every start after), the port
takes the game's own icon from your game files - the one the Wii shows for its save -
and gives it to srgz.exe itself, the game window and the taskbar. It also makes a
shortcut "Sonic Riders Zero Gravity" next to the port folder and one on your desktop
(only once - if you delete the desktop one, it stays deleted). If you replace srgz.exe
with a newer one, it gets the icon again at its first start. (Windows sometimes keeps
showing the old icon for a while; it catches up on its own.)


STEP 3 - FIRST START: SET UP THE GAME
-------------------------------------
Start srgz.exe. The first time, the launcher opens on a SET UP screen.

1. If it says "Locate Dolphin", select it and pick Dolphin.exe in your Dolphin
   folder. (Most installs are found by themselves.)
2. Select SET UP and choose your disc image (.iso, .rvz, .wbfs, .wia, .ciso or .gcz).
3. Wait a few minutes while Dolphin unpacks it. You can cancel any time.
4. When it says "All set!", press A / Enter. The PLAY button appears.

The launcher checks the disc before and after unpacking. If it's the PS2 version,
another region or another game, it tells you so and doesn't change anything.
When it's done, a folder called DATA sits next to "port". That's your game.
You can delete or keep the disc image; the port only uses DATA.


PLAYING
-------
Press PLAY (or Start / F5). Controllers work right away: an Xbox, PlayStation,
Switch Pro or most other pads.

Launcher controls:
                       Controller          Keyboard
  Move                 D-pad / stick       Arrow keys
  Select               A                   Enter
  Back                 B                   Esc
  Switch pages         LB / RB             Tab (or Q / E)
  Play                 Start               F5
  Move a mod up/down   X / Y               Page Up / Page Down
The mouse works too.

In game, on a controller: L and R are on both the triggers (LT/RT, L2/R2) and the
bumpers (LB/RB, L1/R1). The GameCube's Z button is on Back/View (Share/Create and the
touchpad click on PlayStation pads).
In game: Alt+Enter switches fullscreen, F3 shows the FPS counter.

PlayStation controllers: DualShock 4 and DualSense work over USB or Bluetooth.
A DualShock 3 needs its Windows driver first (for example DsHidMini). For unusual
pads, such as some PS2-to-USB adapters, put a gamecontrollerdb.txt (the community
SDL_GameControllerDB list) in the "port" folder and the port reads it.

If you ticked "Skip this launcher next time", hold Shift while starting srgz.exe to
see the launcher again.


LAUNCHER PAGES
--------------
Play              Start the game, check for updates, or quit.
Online            Host or join an online race (see below).
Display           Internal resolution (1x-6x), widescreen 16:9, fullscreen, VSync,
                  FPS counter, "Hide the race HUD" (for recording clean
                  footage; F4 in game turns it on and off), button prompts
                  (GameCube / PlayStation / Xbox).
                  Tip for recording: finish a single-player race, pick Replay,
                  and press F4 - the replay's own cameras with no HUD.
Audio & Language  Volume, the launcher's music (the game's menu theme, from your
                  copy of the game) and the game's language.
Saves             Bring your progress over from Dolphin or a Wii (see below).
Gameplay Mods     Built-in mods (see below).
File Mods         Mods that replace game files (see below).


UPDATES
-------
Every time it starts, the port asks GitHub whether a newer version is out. If one
is, the launcher tells you and can open its download page. (With the launcher
skipped, the game window's title says so instead.) Nothing is downloaded or
installed by itself. To update, unzip the new version over this one: your game
files (DATA), saves and settings aren't in the download, so they stay.
"Check for updates" on the Play page checks right away. To turn the automatic
check off, switch off "Check for updates when the game starts" on the same page
(or set check_updates = 0 in port\settings.ini).


ONLINE PLAY (up to 4 players)
-----------------------------
Open the launcher's Online page.

  Hosting:
    1. Choose the number of players (2-4) and select "Host a room".
    2. You get a room code like 7Q2KD-9MXAT. Copy it (Y / C) and send it to your
       friends. The launcher sets up your router by itself. If it can't, the
       lobby tells you, and you need to forward UDP port 52125 to your PC.
    3. When your friends are in, select "Start the race". Everyone's game starts
       together.

  If the lobby says your router didn't allow automatic setup:
    Players on your home network can always join. For friends elsewhere,
    either:
    - Turn on UPnP in your router's settings (usually under "Advanced" or
      "NAT"), then close the room and host again, or
    - Forward UDP port 52125 to your PC in the router's settings (search for
      "port forwarding" plus your router's brand for the steps). Use your PC's
      local address, which you can see with the "ipconfig" command
      ("IPv4 Address").
    If the lobby mentions a second router or a shared address (CGNAT), port
    forwarding won't help: let a friend whose router works host instead.

  Joining:
    - Select "Join with a room code" and type or paste (Ctrl+V) the code, or
    - if the host is on your home network, their room shows up on the Online
      page; just select it.
    Then wait in the lobby until the host starts.

  Good to know:
    - Everyone needs the same srgz.exe, the same game files and the same mods
      (gameplay mod and file mods). The lobby says what's different if not.
    - Everyone races on a copy of the host's save. Your own save isn't touched.
    - Players join in the lobby. You can't join a race that's already running.
    - To leave, just close the game. If a player leaves, their racer coasts and
      the race goes on. If the host leaves, everyone goes back to the launcher.
    - Windows Firewall may ask about srgz.exe the first time. Choose "Allow".
    - The window title shows the online status. If it ever says the games went
      out of sync, please send port\log.txt from every player.


SAVES - BRINGING YOUR PROGRESS OVER
-----------------------------------
The port uses the same save format as the Wii and Dolphin, so your progress carries
over. Open the Saves page:

  From Dolphin:
    Select "Import from Dolphin". It shows the date of Dolphin's save first.

  From a 0_Games.sav file (a backup, a friend's save, a Dolphin save folder):
    Select "Import a save file" and pick 0_Games.sav.

  From a real Wii (or a downloaded Wii save - usually data.bin, sometimes renamed
  to something like "sonic-riders-zero-gravity.12345.bin"):
    The Wii encrypts these, and only Dolphin can unlock them:
    1. Select "Import a save file" and pick the file.
    2. Press "Open Dolphin". Dolphin starts, and the file's location is copied
       for you.
    3. In Dolphin choose Tools > Import Wii Save..., paste (Ctrl+V) into the file
       name box, and press Open.
    4. Switch back to the launcher. It notices Dolphin's new save and asks
       "Use it in the port now?" Press A / Enter.

  To Dolphin:
    "Copy this save to Dolphin" sends your port progress to Dolphin.

Nothing gets lost: before any import, your current save is copied to
port\nand_backup\<date and time>\. When copying to Dolphin, Dolphin's old save
is kept as 0_Games.sav.before-port-copy. To go back, copy the files from a backup
folder into port\nand\title\00010000\52533945\data\.


GAMEPLAY MODS
-------------
Riders Classic Style
    Restores the racers' natural type abilities, so you can use any gear you
    want and your rider keeps their type (Speed grinds, Fly takes air rings,
    Power breaks obstacles). Boost with LB/LT to attack rivals, use shortcuts
    or just speed things up. Also adds charge jumps.
    How it works: the boost costs 50 GP (20 rings on Chaos Emerald and The
    Crazy, which run on rings) and gives you 5 seconds in the Attack item's
    attack mode. For a charge jump, hold A to charge and release to jump - time
    the release for the ramp's edge. Riders on skates fly through air rings
    and long jumps in the arms-out flying pose (as in Regravitified). Music,
    menus and opponents stay vanilla.
    Works with just your game; it doesn't need Regravitified.

Sonic Riders: Regravitified
    Plays the Regravitified ROM hack, with its changes and new music.

Turn on one at a time. Regravitified uses code from your own copy of the hack, so
you need its disc image (made by patching your own disc, as its authors describe).
To add it: Gameplay Mods > "Set up Regravitified from its disc image", then pick
the patched image. It goes into a folder called "Regravitified DATA", and the
Regravitified switch appears on the page. (Without it, it isn't listed.)

Regravitified updates: version 1.0.2 and later come as a file called patch.zg.
Put patch.zg in the same folder as "Regravitified DATA" (the game's folder), or
keep it where Dolphin downloaded it (Dolphin Emulator\Wii\title\00010000\
53525a45\data) - the port finds it either way. The version shows in the corner
of the Mode Select screen (v1.0.2), and its unlocks (every character and gear)
work as in Dolphin. Without patch.zg it plays version 1.0.1. "Check for Updates"
in the game's menu can't connect from the port; get patch.zg with Dolphin.


FILE MODS
---------
Put each mod in its own folder inside "mods" next to "port" (the launcher's
"Open the mods folder" button takes you there). Tick the mods you want on the File
Mods page. If two mods change the same file, the lower one in the list wins.


MAKE THE LAUNCHER YOURS (optional)
----------------------------------
Once your game is set up, the launcher takes on the game's look, laid out like
its Mode Select screen: the header line with the page name in the game's
lettering, button prompts top right (in your Button prompts style), the game's
own menu bars and description panel, and its logo - plus its menu music.
All of these are read from your copy of the game (nothing is included).
Put these in port\launcher\ to use your own pictures instead:
    banner.png       a wide picture shown at the top instead of the game's logo
    background.jpg   a picture behind the menus (or background.png)
When both are there, switch between them on the Display page with "Launcher look"
(the game's look / my pictures).


FOLDER LAYOUT (after setup)
---------------------------
    SRZG\
      DATA\                     your game (made by SET UP)
      Regravitified DATA\       optional, for the gameplay mods
      mods\                     optional file mods
      port\
        bin\srgz.exe
        settings.ini            your launcher settings
        nand\                   your save
        nand_backup\            automatic save backups
        launcher\               optional banner / background
        log.txt                 what happened on the last start


PLAYSTATION AND XBOX BUTTON PROMPTS
-----------------------------------
Display > "Button prompts" picks the buttons the game shows: GameCube (the game's
own), PlayStation or Xbox. Then in the game choose Options > controls > GameCube
Controller, because that is the set of prompts the swap replaces.
  PlayStation: A = cross, B = circle, X = square, Y = triangle, L = L1, R = R1.
               All of these come from your own copy of the game.
  Xbox:        A, B, X, Y, L = LB, R = RB. Icons by VictorPines (Wikimedia
               Commons, CC BY-SA 4.0) - see CREDITS.txt.
Pictures of whole controllers (in Options and the tutorials) stay as they are.


TROUBLESHOOTING
---------------
"No game files found" / the SET UP screen keeps coming back
    Run SET UP again with your disc image. DATA must sit next to "port", and
    DATA\sys\main.dol must exist.

"These look like files from the PlayStation 2 version"
    Only the Wii version works. The PS2 version is a different program.

"This is a different region's disc"
    Only the North American Wii disc (RS9E8P) works.

"DolphinTool wasn't found"
    Select "Locate Dolphin" and pick Dolphin.exe. If it still isn't found, update
    Dolphin; recent versions come with DolphinTool.exe.

"Dolphin couldn't extract that image"
    The dump may be incomplete. Try verifying it in Dolphin (right-click the game >
    Properties > Verify) or dump it again. Details are in port\extract_log.txt.

"Not enough free disk space"
    Free up about 4 GB on that drive, or move the port to another drive.

The game won't start or crashes
    Look at port\log.txt and include it when you ask for help.

The game needs a graphics card with OpenGL 3.3 (nearly any PC from the last ten
years). On laptops with two GPUs, the port asks Windows for the faster one.


Sonic Riders: Zero Gravity is (c) SEGA. This is an unofficial fan project, not
affiliated with or endorsed by SEGA or Nintendo. Please support the official releases.
